<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">











<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>NPanday - Releasing .NET Projects with Maven</title>
    <style type="text/css" media="all">
      @import url("../../css/maven-base.css");
      @import url("../../css/maven-theme.css");
      @import url("../../css/site.css");
    </style>
    <link rel="stylesheet" href="../../css/print.css" type="text/css" media="print" />
          <meta name="author" content="19 Feb 2010" />
          </head>
  <body class="composite">
    <div id="banner">
                  <a href="" id="bannerLeft">
    
                                            <img src="../.././images/NPanday.png" alt="" />
    
            </a>
                        <a href="http://www.codeplex.com/" id="bannerRight">
    
                                            <img src="../.././images/logo-home.png" alt="" />
    
            </a>
            <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="breadcrumbs">
          
  

  
    
            
  
    
            <div class="xleft">
          
                <a href="http://npanday.codeplex.com/" class="externalLink">NPanday Home</a>
                &gt;
      
                <a href="../../">NPanday 1.2</a>
                  </div>
            <div class="xright">      
  

  
    
            
  
    
             Last Published: 22 Jun 2010
              &nbsp;| Version: 1.2
            </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="leftColumn">
      <div id="navcolumn">
           
  

  
    
            
  
    
                   <h5>General Info</h5>
            <ul>
              
    <li class="none">
                    <a href="../../index.html">NPanday Overview</a>
          </li>
              
    <li class="none">
                    <a href="../../release-notes.html">NPanday Release Notes</a>
          </li>
              
    <li class="none">
                    <a href="../../faqs.html">NPanday FAQs</a>
          </li>
              
    <li class="none">
                    <a href="../../faqs.html">NPanday Features</a>
          </li>
              
    <li class="none">
                    <a href="../../npanday.pdf">Documentation PDF</a>
          </li>
          </ul>
              <h5>User's Guide</h5>
            <ul>
              
    <li class="none">
                    <a href="../.././guide/index.html">Introduction</a>
          </li>
              
    <li class="none">
                    <a href="../.././guide/installation/index.html">Installation</a>
          </li>
              
    <li class="none">
                    <a href="../.././guide/vs/index.html">Visual Studio Add-in</a>
          </li>
              
    <li class="none">
                    <a href="../.././guide/maven/index.html">Maven Command Line</a>
          </li>
              
    <li class="none">
                    <a href="../.././guide/devinfra/index.html">Maven Development Infrastructure</a>
          </li>
              
    <li class="none">
                    <a href="../../plugins/index.html">NPanday Plugins</a>
          </li>
          </ul>
              <h5>Contributing</h5>
            <ul>
              
    <li class="none">
                    <a href="../.././developers/index.html">Developer's Guide</a>
          </li>
              
    <li class="none">
                    <a href="../.././issue-tracking.html">Issue Tracking</a>
          </li>
              
    <li class="none">
                    <a href="../.././mail-lists.html">Mailing Lists</a>
          </li>
          </ul>
              <h5>Project Documentation</h5>
            <ul>
              
                
              
      
            
      
            
      
            
      
            
      
            
      
            
      
              
        <li class="collapsed">
                    <a href="../../project-info.html">Project Information</a>
                </li>
          </ul>
              <h5>Resources</h5>
            <ul>
              
    <li class="none">
                    <a href="http://maven.apache.org/" class="externalLink">Apache Maven</a>
          </li>
              
    <li class="none">
                    <a href="http://npanday.codeplex.com/" class="externalLink">NPanday on CodePlex</a>
          </li>
          </ul>
                                           <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
            <img alt="Built by Maven" src="../../images/logos/maven-feather.png"></img>
          </a>
                       
  

  
    
            
  
    
        </div>
    </div>
    <div id="bodyColumn">
      <div id="contentBox">
        <div class="section"><h2>Releasing .NET Projects with Maven</h2>
<p>Releasing a project with NPanday follows the same technique as for any Maven project, so the Maven documentation can be consulted on the topic. Here we will provide a brief summary, and give notes on NPanday specific issues. You can refer to the release documentation in <a class="externalLink" href="http://maestrodev.com/node/196"> Better Builds with Maven</a> for more information.</p>
<div class="section"><h3>Setting up the POM</h3>
<p>Before preparing the release, the Maven POM must be set up appropriate for release. The version of the project should be a SNAPSHOT, but all SNAPSHOT dependency, parent and plugin references outside the project solution should be set to fixed releases.</p>
<p>The <tt>&lt;scm&gt;</tt> tag should be configured in the project's <tt>pom.xml</tt>. It should look similar to the following:</p>
<div class="source"><pre>  &lt;scm&gt;
    &lt;connection&gt;scm:svn:[project_url]&lt;/connection&gt;
    &lt;developerConnection&gt;scm:svn:[project_url]&lt;/developerConnection&gt;
    &lt;url&gt;[URL of the project]&lt;/url&gt;
  &lt;/scm&gt;</pre>
</div>
</div>
<div class="section"><h3>Preparing References</h3>
<p>Before starting the release, projects with GAC or COM references should run an additional preparation step:</p>
<div class="source"><pre>mvn npanday.plugin:NPanday.Plugin.SysRef.JavaBinding:prepare</pre>
</div>
<p>The reference (DLL) will be searched from <tt>C:\WINDOWS\assembly\GAC_MSIL</tt> directory and will be put in <tt>C:\WINDOWS\Temp\NPanday</tt> then renamed following the artifact filename format <tt>[artifactId]-[version].[packaging]</tt>.</p>
<p>After the reference is renamed, it will then be installed in the local repository <tt>C:\Documents and Settings\[user_home]\.m2\repository</tt> for it to be used when releasing the project.</p>
<p>The following are examples of references of different types which are renamed then installed in the local repository,</p>
<ul><li><b>gac_msil</b> file: <tt>Microsoft.JScript-8.0.0.0-b03f5f7f11d50a3a.gac_msil</tt></li>
<li><b>com_reference</b> file: <tt>Acrobat-1.1.0.0-<a name="E64169B3-3592-47D2-816E-602C5C13F328">E64169B3-3592-47D2-816E-602C5C13F328</a>-1.1-0.com_reference</tt></li>
</ul>
</div>
<div class="section"><h3>Preparing and Performing the Release</h3>
<p>Following this, the Maven release process can be used. First, it needs to be prepared:</p>
<div class="source"><pre>mvn release:prepare</pre>
</div>
<p>Following the prompts will adjust the versions and manipulate SCM to end up with a tagged release, and trunk ready for more development.</p>
<p>After that (or at a point in the future), the release can be built and published using the perform command:</p>
<div class="source"><pre>mvn release:perform</pre>
</div>
<p>This will also deploy the built artifacts to an artifact repository. See <a href="../devinfra/artifact-repository.html"> Setting up an Artifact Repository</a> for information on how to do this and to configure the POM's <tt>distributionManagement</tt> section accordingly.</p>
</div>
</div>

      </div>
    </div>
    <div class="clear">
      <hr/>
    </div>
    <div id="footer">
      <div class="xright">&#169;  
          2010
    
          NPanday
          
  

  
    
            
  
    
  </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
  </body>
</html>
